<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport"
        content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <meta name="format-detection" content="telephone=no">
  <meta http-equiv="x-rim-auto-match" content="none">
  <title>支付收银台</title>
  <script src="${request.contextPath}/statics/js/jquery.js"></script>
  <style>
    * {
      padding: 0;
      margin: 0;
    }
    a {
      text-decoration: none;
    }

    .clearfix1:after {
      content: '';
      height: 0;
      line-height: 0;
      visibility: hidden;
      display: block;
      clear: both;
    }

    .clearfix1 {
      zoom: 1;
    }

    html, body {
      background-color: #EDEDED;
    }

    .page {
      width: 660px;
      margin: 0 auto 24px;
      background-color: #ffffff;
    }

    .header {
      position: relative;
      text-align: center;
      height: 67px;
      line-height: 67px;
      vertical-align: middle;
      overflow: hidden;
      padding: 10px 0;
    }
 .header .img {
   width: 26%;
   display: inline-block;
 }
    .header img {
      width: 100%;
      vertical-align: middle;
    }

    .main {
      overflow: hidden;
    }
    .green {
      color: #4EA5E9;
    }
.save {
  display: none;
}
    .main .order {
      margin: 21px auto 14px;
      text-align: center;
      font-size: 22px;
      color: #999999;
      font-family: PingFangSC-Medium;
    }

    .main .txt1,.main .txt2 {
      letter-spacing: 1px;
      width: 60%;
      padding: 2% 0;
      text-align: center;
      margin: 0 auto 20px;
      color: #ffffff;
      font-size: 22px;
      /*font-weight: bold;*/
      font-family: PingFangSC-Regular;
      background: #4EA5E9;
      border-radius: 5px;
    }

    .main .footer {
      width: 80%;
      margin: 27px auto 0;
      border-top: 2px solid #dbdbdb;
      padding-top: 12px;
      font-size: 20px;
      color: #000;
    }
    .main .footer div {
      padding-left: 20px;
    }
    .main .footer .tip {
      float: left;
      display: inline-block;
      width: 20px;
      height: 20px;
      background: url("${request.contextPath}/statics/image/tip.png") no-repeat;
      background-size: 100% 100%;
    }

    .tip_txt {
      float: left;
      font-size: 20px;
      margin-left: 8px;
      color: #ff0000;
      display: inline-block;
      height: 18px;
      line-height: 18px;
    }

    .main .footer p {
      margin-bottom: 6px;
      padding-left: 20px;
      padding-bottom: 12px;
      border-bottom: 1px dotted #f1f1f1;
    }
    .mob {
      display: none;
    }
    @media (max-width: 640px) {
      @keyframes changeColor {
        0%{color: #d82b1e}
        50% {color: #e79739;}
        100%{color: #d82b1e}
      }

      .page {
        width: 100%;
        margin: auto;
        background-color: #EDEDED;
      }
      .header {
        height: 50px;
        line-height: 50px;
        margin-top: 100px;
            margin-bottom: 15px;
        padding: 0;
      }
      .header .img {
        width: 30%;
      }
      .main .order {
        font-size: 15px;
      }
      .main .order .save {
        display: block;
        font-weight: bold;
        font-size: 20px;
        color: #333333;
        margin-bottom: 10px;
      }
      .mob {
        display: block;
      }
      .main .txt1,.main .txt2 {
        width: 85%;
        padding: 3% 0;
        font-size: 18px;
        margin: 0 auto 10px;
        font-weight: bold;
        background-color: #4EA5E9;
      }
      .main .footer {
        margin: 15px auto 0;
        font-size: 15px;
        width: 95%;
      }
      .main .footer div {
        padding-left: 15px;
      }
      .main .footer p {
        margin-bottom: 3px;
        padding-left: 15px;
        padding-bottom: 5px;
      }
      .main .footer .tip {
        width: 18px;
        height: 18px;
      }
      .tip_txt {
        font-size: 18px;
      }
    }
  </style>
</head>
<body>
<div class="header page">
  <span class="img">
      <img src="${request.contextPath}/statics/image/logo.png" alt="">
  </span>
</div>
<div class="main page">
  <div class="order"><span class="save" style="color: red;">支付金额：${amount !''}元</span></div>
  <div class="order"><span class="save">订单号：${orderid !''}</span></div>
  <div class="txt1">
    <span class="mob">正在请求支付。。。</span>
  </div>
  <div class="txt2" onclick="goBackHome();" style="display: none;">
    <span class="mob">点击返回首页</span>
  </div>
</div>
</body>
<script src="https://gw.alipayobjects.com/as/g/h5-lib/alipayjsapi/3.1.1/alipayjsapi.inc.min.js"></script>
<script type="text/javascript">
var tradeno= "${tradeno !''}";
goAliPay();
function goAliPay() {
	AlipayJSBridge.call("tradePay",{
			tradeNO:'2019062422001116490517370710',
			bizType:'share_pp_pay',
			bizSubType:'peerpay_trade'
		},function(result) {
			if(result.resultCode==9000||result.resultCode=="9000"){
  	    	  	setTimeout(goBackHome,2000);
  	        }else{
  	          $('.txt1').hide();
  	          $('.txt2').show();
  	    	  ap.alert({
                    title: '亲，出问题了',
                    content: '请您返回网站重新生成付款订单',
                    buttonText: '好的'
                }, function () {
                	goBackHome();
              	});
  	      }
		});
   }
</script>

<script>
	function goBackHome(callback) {
		AlipayJSBridge.call('popWindow');
		if (window.AlipayJSBridge) {
			callback && callback();
		} else {
			document.addEventListener('AlipayJSBridgeReady', callback, false);
		}
	}
</script>
</html>